async function a() {
  await setTimeout(() => {
    process.stdout.write('hahahahahahh1')
    d()
  }, 1000)
}

async function d() {
  await setTimeout(() => {
    process.stdout.write('\r')
    process.stdout.write('hahahahahahh2')
    c()
  }, 1000)
}

async function c() {
  await setTimeout(() => {
    process.stdout.write('\r')
    process.stdout.write('hahahahahahh3')
    process.stdout.write('\n')
  }, 1000)
}
a()
